<div class="row">
	<div class="col-sm-8">
		<div class="page-header">
			<h2>用例:{{case.name}}</h2>
		</div>
		<button class="btn btn-danger pull-right"
			ng-hide="isRemoving"
			ng-click="isRemoving=true">删除</button>
		<div class="input-group pull-right" style="width:220px" ng-show="isRemoving">
			<span class="input-group-btn">
				<button class="btn btn-primary"
					ng-click="isRemoving=false">取消</button>
			</span>
			<form ng-submit="removeCaseEnter()" style="margin:0">
				<input type="text" class="form-control" placeholder="输入 DELETE"
					ng-model="deleteWord" />
			</form>
			<span class="input-group-btn">
				<button class="btn btn-danger"
					ng-click="removeCase()"
					ng-disabled="deleteWord!=='DELETE'">确定</button>
			</span>
		</div>
		<h3>属性</h3>
		<div class="form-group">
			<label for="">用例名称</label>
			<div class="input-group">
				<input class="form-control" id="case-name" ng-model="caseData.name" />
				<span class="input-group-btn">
					<button class="btn"
						id="case-reviewed-setter"
						ng-class="caseData.reviewed?'btn-success':'btn-danger'"
						ng-click="caseData.reviewed=!caseData.reviewed">{{caseData.reviewed?'已审阅':'未审阅'}}
					</button>
				</span>
			</div>
		</div>
		<div class="form-group">
			<label>注释</label>
			<textarea class="form-control" ng-model="caseData.comment"
				id="case-comment"
				style="height:160px;"></textarea>
		</div>
		<p>
			<button class="btn btn-primary"
				id="case-update-button"
				ng-click="updateCase()"
				ng-disabled="case.name==caseData.name&&
					case.comment==caseData.comment&&
					case.reviewed==caseData.reviewed||caseData.name==''">
				更新
			</button>
		</p>
		<div ng-show="case.code && case.code.length>0">
			<h3>LemonCase&nbsp;代码</h3>
			<pre class="JavaScript" ng-bind-html="code" style="overflow:visible"></pre>
		</div>
	</div>
	<div id="sideBar" class="col-sm-3 col-sm-offset-1 hidden-xs">
		<h4>预览</h4>
		<p><a class="btn btn-primary hidden-xs" target="_blank"
			ng-href="{{project.probePath}}#/?probe={{project.probeId}}&token={{token.token}}&caseId={{case.caseId}}">
			<span class="glyphicon glyphicon-edit"></span>&nbsp;用探针编辑</a></p>
		<p><em>提示：点击该按钮，将在一个新页面跳转到探针，并快速打开该测试用例以编辑</em></p>
		<h4>标签</h4>
		<p>设置合理的标签有助于快速搜索感兴趣的用例</p>
		<form ng-submit="addTag()" class="input-group">
			<input type="text" class="form-control"
				placeholder="输入标签按回车添加"
				ng-model="newTag"
				id="tag-input" />
			<span class="input-group-btn">
				<button class="btn btn-primary">添加</button>
			</span>
		</form>
		<p><div class="btn-group form-group" ng-repeat="tag in case.tags track by $index">
			<label type="button" class="btn btn-default btn-xs">{{tag}}</label>
			<button ng-click="removeTag($index)"
				class="btn btn-default btn-xs"><span
					class="glyphicon glyphicon-remove"></span></button>&nbsp;</div></p>
	</div>
</div>
